package com.health.controller.backend;

import com.health.common.Result;
import com.health.domain.CheckGroup;
import com.health.service.CheckGroupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Service
public class CheckGroupController {

    @Autowired
    private CheckGroupService checkGroupService;

    @GetMapping("/checkgroup/findById")
    public Result findById(@RequestParam("id") Integer id){
        CheckGroup checkGroup = checkGroupService.findById(id);

        return new Result(true,"查询检查组成功",checkGroup);
    }

    @GetMapping("/checkgroup/findCheckItemIdsByCheckGroupId")
    public Result findAll(@RequestParam("id") Integer id){
        Integer[] integers = checkGroupService.findAll(id);

        return new Result(true,"查询检查项成功",integers);
    }
}
